5/31/13, Brandon Stewart (bstewart@fas.harvard.edu)
*Thanks to grant support from the National Science Foundation and the Institute for Quantitative Social Science at Harvard.  This project would not have been even remotely possible without the efforts of the Chronicling America project run by the Library of Congress.

Replication code and data is provided here for the article "How Do You Measure a Constitutional Moment? Using Algorithmic Topic Modeling To Evaluate Bruce Ackerman�s Theory of Constitutional Change" by Daniel Young in the Yale Law Journal based on joint work with Brandon Stewart.  This is part of a larger project which will contain additional data.  Since that project will be providing data for general use, this data and code archive is primarily for replication purposes. 

We have provided data as we can but unfortunately there are certain components which we cannot publicly post.  There are other components which are simply too large to post.  Where those appear we have noted below.  ALL of the analysis scripts are contained here so if there is something used in the paper it will clearly appear in one of the scripts.  If you need something that isn't provided just contact me at the email above and I will get you set up.

Overview of Contents:
- Data Files:
66election_unigrams.csv - Term-document matrix for the front page articles from 6/1/1866-12/31/1866
66meta.csv - Meta data for 66election_unigrams.csv which includes links to the original pdf versions.

68election_unigrams.csv - Term-document matrix for the front page articles from 6/1/1868-12/31/1868
68meta.csv - Meta data for 68election_unigrams.csv which includes links to the original pdf versions.

NewspaperAppendix.pdf - list of newspapers, cities and number of pages for each dataset.

CohaUnigrams.txt - This contains the direction we use from the Corpus of Historical American English.  Davies, Mark. (2010-) The Corpus of Historical American English: 400 million words, 1810-2009. Available online at http://corpus.byu.edu/coha/.  We can't redistribute this data but you can either get it directly from them, or contact me at the email above and I can get you what you need to replicate the analyses.

-Analysis Files:

Analysis.R - This contains all of the R code necessary to replicate the analyses in the paper.  Note that much of the code necessary to replicate the figures is extremely complicated due to Yale's requirement that the text be in the YLJ font.  You can skip all of this when running locally.

Lift.R - A short function to calculate word's using Matt Taddy's "lift" formula.

hlda - This folder contains the model output and code for analyzing the results of the hierarchical LDA model.  The model itself was run in Mallet which is freely available http://mallet.cs.umass.edu/topics.php  Contact me if you need exact replication code/data for the model as it is quite large.


Article Link: (http://www.yalelawjournal.org/the-yale-law-journal/note/how-do-you-measure-a-constitutional-moment?-using-algorithmic-topic-modeling-to-evaluate--bruce-ackerman%E2%80%99s-theory-of-constitutional-change/)	 
  